package com.pilipili.zeus.eduService.client;

import com.pilipili.commonutils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Unlimited_Blade_Works
 * 将方法变为接口,控制器注入此类即可调用其方法
 */
@Component
@FeignClient("service-vod")
public interface VodClient {
    /**
     * 调用vod中的输出方法,必须设置("id"),路径写全名
     * @param id
     * @return Result.ok()
     */
    @DeleteMapping("/vod/video/deleteVideo/{id}")
    Result deleteVideo(@PathVariable("id") String id);

    /**
     * 删除全部视频
     * @param videoIdList
     * @return
     */
    @DeleteMapping("/vod/video/deleteVideos")
    Result deleteVideos(@RequestParam("videoIdList") List<String> videoIdList);
}
